#ifndef frm_control_TCol_H
#define frm_control_TCol_H

#include "frm_control_TRow.h"
#include "frm_control_TSplitter.h"

namespace frm { namespace control {

////////////////////////////////////////////////////////////////////////////////
struct TTable;
////////////////////////////////////////////////////////////////////////////////

struct TCol : public TPanel
{
  struct TStyle : public frm::TStyle
  {
    svl_Type(frm::TStyle)
    TPanel::TStyle Normal,Selected,Focused;
    //
    virtual void SetFromParent(frm::TStyle *Parent);
    virtual svl::TInfoParam AddInfoTo(svl::TInfoParam Info);
  };
  //
  svl_Type(TPanel)
  TCol(TWindow &Window);
 ~TCol();
  //
  TCol &SetStyle(TStyle &V);
  //
  void         SetGroupName(svl::TString V) { groupName = V; }
  svl::TString GetGroupName()               { return groupName; }

protected:
  virtual void TComponent_Mouse(TMouse Mouse);
  //
  virtual bool TComponent_SelectEnable() { return true;}
  virtual void TComponent_SelectEnter ();
  virtual void TComponent_SelectExit  ();
  //
  virtual bool TComponent_FocusEnable() { return true;}
  virtual void TComponent_FocusEnter();
  virtual void TComponent_FocusExit ();
  //
  virtual void TComponent_SetCaretByX  (TGeometryRect &GRect,int XClient);
  virtual void TComponent_SetCaretByPos(TGeometryRect &GRect,int Pos);
  //
  virtual void TComponent_ScrollToVisible(TGeometryRect &GRect);
  //
  virtual void TComponent_AddToParent(TComponent *Parent);
  virtual void TComponent_BeforeDeleteRow(TTable *Table);
  //virtual void TComponent_BeforeUnlinkThis();
  //virtual void TComponent_DeleteFromParent(TComponent *Parent);
  virtual void TComponent_InheritStyleFrom(TTableOfStyles &ParentStyles);

private:
  TStyle *style;
  svl::TString groupName;
  svl_Except;
};

///////////////////////////////////////////////////////////////////////////////
}}

#endif
